package com.xiaotao.learn.algorithm.math;

class FractionToDecimal {
    public String fractionToDecimal(int numerator, int denominator) {
        int a = numerator/denominator;
        if (numerator%denominator == 0) return a+"";
        String b = ("" + (double)numerator/denominator).substring(2);

        return a + "." + b;
    }
}

public class FractionToDecimalTest {
    public static void main(String[] args) {
        System.out.println(4%333 + " " + (double)4/333);
    }
}
